package com.bluedot.bank.action;

import com.bluedot.bank.dao.customer.Customer;
import com.bluedot.bank.dao.customer.CustomerDao;
import com.bluedot.bank.dao.customer.CustomerDaoImpl;
import com.opensymphony.xwork2.ActionSupport;

public class AddCustomerAction extends ActionSupport {

	/**
	 * 
	 */
	private static final long serialVersionUID = 1L;
	private Customer customer;
	/**
	 * @return the customer
	 */
	public Customer getCustomer() {
		return customer;
	}
	/**
	 * @param customer the customer to set
	 */
	public void setCustomer(Customer customer) {
		this.customer = customer;
	}
	@Override
	public String execute() throws Exception {
		CustomerDao customerDao=new CustomerDaoImpl();
		customerDao.create(customer);
		return SUCCESS;
	}

}
